package phoenix.web.test_suites.benaughty.critical;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import phoenix.core.base.TestSuiteBase;
import phoenix.core.data_models.UserProfileDataModel.AboutMe;
import phoenix.core.data_models.UserProfileDataModel.LookingFor;
import phoenix.web.test_objects.*;

/**
 * Test suite - Critical tests
 */
public class MenuTS extends TestSuiteBase
{
	private final RegistrationTests registrationTests = new RegistrationTests(phoenix);
	private final BackendTests backendTests = new BackendTests(phoenix);
	private final FunnelTests funnelTests = new FunnelTests(phoenix);
	private final MainMenuTests mainMenuTests = new MainMenuTests(phoenix);

	@DataProvider
	public Object[][] registrationDataMale()
	{
		return registrationTests.dataProviders.registrationDataMale();
	}

	@DataProvider
	public Object[][] funnelData()
	{
		return funnelTests.dataProviders.funnelData();
	}

	@Test(dataProvider = "registrationDataMale", groups = { "registration" }, priority = 1, enabled = true)
	public void registrationMaleTest(String p_userGender, String p_userEmail, String p_userPassword, String p_userBirthDay, String p_userBirthMonth,
			String p_userBirthYear)
	{
		registrationTests.registrationTest(p_userGender, p_userEmail, p_userPassword, p_userBirthDay, p_userBirthMonth, p_userBirthYear);
	}

	@Test(dependsOnMethods = { "registrationMaleTest" }, groups = { "registration" }, priority = 2, enabled = true)
	public void getUserDataTest()
	{
		backendTests.getUserDataTest(testUser().getEmail());
	}

	@Test(dependsOnMethods = { "getUserDataTest" }, groups = { "registration" }, priority = 4, enabled = true)
	public void confirmationMaleTest()
	{
		funnelTests.confirmationTest();
	}

	@Test(dependsOnGroups = { "registration" }, dataProvider = "funnelData", groups = { "funnel" }, priority = 5, enabled = true)
	public void funnelMaleTest(String p_screenName, LookingFor p_lookingForParams, AboutMe p_aboutMeParams)
	{
		funnelTests.funnelTest(p_screenName, p_lookingForParams, p_aboutMeParams);
	}

	@Test(dependsOnGroups = { "registration" }, groups = { "menu" }, priority = 8, enabled = true)
	public void userMenuTest()
	{
		mainMenuTests.userMenuTest();
	}

	@Test(dependsOnGroups = { "registration" }, groups = { "menu" }, priority = 9, enabled = true)
	public void searchMenuTest()
	{
		mainMenuTests.searchMenuTest();
	}

	@Test(dependsOnGroups = { "registration" }, groups = { "menu" }, priority = 10, enabled = true)
	public void activityMenuTest()
	{
		mainMenuTests.activityMenuTest();
	}

	@Test(dependsOnGroups = { "registration" }, groups = { "menu" }, priority = 11, enabled = true)
	public void leftBarNavigationTest()
	{
		mainMenuTests.leftNavigationBarTest();
	}

	@Test(dependsOnGroups = { "registration" }, groups = { "menu" }, priority = 12, enabled = true)
	public void topMenuTest()
	{
		mainMenuTests.topMenuTest();
	}
}